<template>
  <div style="position: absolute;top: 20px;left: 30px;z-index:9">
    <div style="background-color: #101A64;float: left">
      <div class="leftTopItem" @click="toggleLayerControl"><span class="iconfont icon-tuceng"></span><span style="margin-left: 5px">空间图层</span>
        <div style="height: 100%;float: right;line-height: 36px;padding-right: 5px">
          <i :class="[showLayerControl?'el-icon-caret-top':'el-icon-caret-bottom']" ></i>
        </div>
      </div>
      <div class="toolSplitLine"></div>
    </div>
  </div>

</template>

<script>
  export default {
    name: "LeftTop",
    data(){
      return {
        showLayerControl:false
      }
    },
    methods: {

      toggleLayerControl(){
        this.showLayerControl=!this.showLayerControl;
        this.$bus.emit("toggleLayerControl")
      }
    }
  }
</script>

<style scoped>
  .leftTopItem {
    color: white;
    height: 36px;
    width: 200px;
    float: left;
    background-color: #101A64;
    line-height: 36px;
    padding-left: 15px;
  }

  .selectwidth{
    width: 300px;
  }
  .leftTopItem > span:last-child {

  }

  .leftTopItem:hover {
    color: #0AC8FF;
  }

  .toolSplitLine {
    float: left;
    width: 1px;
    height: 22px;
    background: #283170;
    border-radius: 1px;
    margin-top: 7px;
  }
</style>
